package com.chenbei.schedule.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "调度任务日志")
@Data
@TableName("sys_schedule_job_log")
public class ScheduleJobLog {

    @Schema(description = "主键ID")
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    @Schema(description = "任务ID")
    @TableField("job_id")
    private Long jobId;

    @Schema(description = "开始时间")
    @TableField("start_time")
    private LocalDateTime startTime;

    @Schema(description = "结束时间")
    @TableField("end_time")
    private LocalDateTime endTime;

    @Schema(description = "总执行时间")
    @TableField("total_execution_time")
    private Long totalExecutionTime;

    @Schema(description = "状态[0:异常|1:成功|2:执行中]")
    private Integer status;

    @Schema(description = "异常信息")
    private String exceptionMessage;
}
